package com.sun.mapper;

import com.sun.bean.Employee;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmployeeDao {
    //查询
    public Employee getEmpById(Integer id);
    public Map getMapEmp(Integer id);
    @MapKey("id")//指定id为key
    public Map<Integer,Employee> getMapEmps();
    public List<Employee> getListEmp();
    public Employee getEmpByIdAndName(Map map);




    public Integer insEmp(Employee employee);
    public Employee updaEmp(@Param("employee") Employee employee);
    public Employee delEmp(Integer id);

}
